package edu.ccut.saturn.basecomponent.baseservicecomponent;

/**
 * 从内存中删除一条字典
 */
import java.util.List;

import edu.ccut.saturn.component.DefaultComponent;
import edu.ccut.saturn.component.IDictItemInfo;
import edu.ccut.saturn.component.IParameterContext;
import edu.ccut.saturn.component.SaturnDictionaryManager;

public class DeleteRunTimeDict extends DefaultComponent {
	@Override
	public void execute(IParameterContext parameterContext) throws Exception {
		String dictname = (String) parameterContext.getParameterValue(0);// "qx_usertype";
		String dictcode = (String) parameterContext.getParameterValue(1);
		List<IDictItemInfo> list = SaturnDictionaryManager.getInstance()
				.getDataDictTypeInfo(dictname).getItems();
		IDictItemInfo item = SaturnDictionaryManager.getInstance()
				.getDataDictItemInfo(dictname, dictcode);
		list.remove(item);
	}
}